type: object
properties:
  logLevel:
    type: string
    enum: ["Debug", "Info", "Error"]
    x-examples: ["Info"]
    description: |
      Deckhouse logging level.
    default: "Info"
  bundle:
    type: string
    enum: ["Default", "Minimal", "Managed"]
    x-examples: ["Default"]
    description: |
      The Deckhouse [bundle](../../#module-bundles) defines a set of modules enabled by default.
      - `Default` — the recommended set of modules for cluster operation: monitoring, authorization control, networking and other needs.
      - `Managed` — the bundle aimed at clusters managed by cloud providers (e.g., Google Kubernetes Engine).
      - `Minimal` — the minimum possible bundle option (includes a single module — this one). **Note** that several basic modules are not included in the set of modules `Minimal` (for example, the CNI module). Deckhouse with the set of modules `Minimal` without the basic modules will be able to work only in an already deployed cluster.
    default: "Default"
  releaseChannel:
    type: string
    enum: ["Alpha", "Beta", "EarlyAccess", "Stable", "RockSolid"]
    x-examples: ["Stable"]
    description: |
      Desirable Deckhouse release channel (Deckhouse will [switch](https://deckhouse.io/documentation/v1/deckhouse-faq.html#what-happens-when-the-release-channel-changes) to it when such an opportunity appears).

      The order in which the stability of the release channel increases (from **less** stable to **more** stable): `Alpha`, `Beta`, `EarlyAccess`, `Stable`, `RockSolid`.
  update:
    type: object
    description: Settings of the Deckhouse update mode and windows.
    x-examples:
      - windows:
          - from: "8:00"
            to: "15:00"
            days:
              - Tue
              - Sat
        disruptionApprovalMode: Manual
        notification:
          webhook: https://release-webhook.mydomain.com
          minimalNotificationTime: 6h
          auth:
            basic:
              username: user
              password: password
    properties:
      mode:
        type: string
        default: 'Auto'
        description: |
          Deckhouse minor version update mode (release change). **Does not affect patch version updates.**
          - `Auto` — all updates are applied automatically.

            Deckhouse minor version updates (release updates, for example, from `v1.26.*` to `v1.27.*`), are applied according to the update windows or (if no update windows are set) as they appear on the corresponding release channel;
          - `Manual` — to change a minor version of Deckhouse (for example, from `v1.26.*` to `v1.27.*`), manual confirmation is required.

            To confirm the update, edit [custom resource 'DeckhouseRelease'](https://deckhouse.io/documentation/v1/modules/002-deckhouse/cr.html), which corresponds to the version by setting the `approved' field to 'true'.
        enum:
          - 'Auto'
          - 'Manual'
      disruptionApprovalMode:
        type: string
        default: 'Auto'
        enum:
          - 'Auto'
          - 'Manual'
        description: |
          Deckhouse release update disruption mode:
          - `Auto` — approves release with disruptions (potentially dangerous changes) automatically.
          - `Manual` — requires manual release confirmation (set annotation `release.deckhouse.io/disruption-approved=true`).
      windows:
        type: array
        description: |
          List of update windows during the day.
        items:
          type: object
          required:
            - from
            - to
          properties:
            from:
              type: string
              pattern: '^(?:\d|[01]\d|2[0-3]):[0-5]\d$'
              example: '13:00'
              description: |
                Start time of the update window (UTC timezone).

                Should be less than the end time of the update window.
            to:
              type: string
              pattern: '^(?:\d|[01]\d|2[0-3]):[0-5]\d$'
              example: '18:30'
              description: |
                End time of the update window (UTC timezone).

                Should be more than the start time of the update window.
            days:
              type: array
              description: The days of the week on which the update window is applied.
              example: ["Mon", "Wed"]
              items:
                type: string
                description: Day of the week.
                x-examples: [Mon]
                enum:
                  - Mon
                  - Tue
                  - Wed
                  - Thu
                  - Fri
                  - Sat
                  - Sun
      notification:
        type: object
        description: |
          Settings for notifications of scheduled Deckhouse updates.

          Has the effect **only** when the [automatic update mode](#parameters-update-mode) is set and **only** for Deckhouse minor version changes (for patch version changes the `notifications` parameter settings are ignored).
        x-examples:
        - webhook: https://release-webhook.mydomain.com
          minimalNotificationTime: 8h
        properties:
          webhook:
            type: string
            pattern: "^https?://[^\\s/$.?#].[^\\s]*$"
            x-doc-example: 'https://webhook.site/#!/bc8f71ac-c182-4181-9159-6ba6950afffa'
            description: |
              URL for an external webhook handler.

              The POST request will be sent on the webhook URL after a new minor version of Deckhouse appears on the update channel before it is applied to the cluster.

              > Use the [minimalNotificationTime](#parameters-update-notification-minimalnotificationtime) parameter if necessary to set the minimum time that must pass before updating from the moment a new minor version appears on the release channel used.

              Example of the POST request payload (`Content-Type: application/json`):

              ```json
              {
                "version": "1.36",
                "requirements":  {"k8s": "1.20.0"},
                "changelogLink": "https://github.com/deckhouse/deckhouse/changelog/1.36.md",
                "applyTime": "2023-01-01T14:30:00Z00:00",
                "message": "New Deckhouse Release 1.36 is available. Release will be applied at: Friday, 01-Jan-23 14:30:00 UTC"
              }
              ```

              Description of POST request fields:
              - `version` - string, minor version number;
              - `requirements` - object, version requirements;
              - `changelogLink` - string, a URL to the minor version changelog;
              - `applyTime` - string, date and time of the scheduled update (taking into account the configured update windows) in RFC3339 format;
              - `message` - string, a text message about the availability of the new minor version and the scheduled update time.
          tlsSkipVerify:
            type: boolean
            default: false
            description: Skip TLS certificate verification while webhook request.
          minimalNotificationTime:
            type: string
            pattern: '^([0-9]+h([0-9]+m)?|[0-9]+m)$'
            x-doc-example: '6h'
            description: |
              The minimum time that must pass before updating from the moment a new minor version appears on the release channel used.

              It is specified as a string containing the time unit in hours and minutes: 30m, 1h, 2h30m, 24h.

              The update mechanism ensures that Deckhouse will not be updated until a specified period of time has passed.

              When using update windows, the Deckhouse update will happen at the nearest possible update window but not before the time specified in `minimalNotificationTime` expires.
          auth:
            type: object
            oneOf:
              - required: [ basic ]
              - required: [ bearerToken ]
            description: |
              Authentication settings for the webhook.

              If the parameter is omitted, the webhook will be called without authentication.
            properties:
              basic:
                type: object
                description: |
                  Basic authentication settings for the webhook.

                  If the parameter is omitted, the webhook will be called without authentication.
                required:
                  - username
                  - password
                properties:
                  username:
                    type: string
                    description: |
                      The username for the webhook.

                      The username and password will be sent in the `Authorization` header in the format `Basic <base64(username:password)>`.
                  password:
                    type: string
                    description: |
                        The password for the webhook.

                        The username and password will be sent in the `Authorization` header in the format `Basic <base64(username:password)>`.
              bearerToken:
                type: string
                description: |
                    The token for the webhook.

                    The token will be sent in the `Authorization` header in the format `Bearer <token>`.
  nodeSelector:
    type: object
    additionalProperties:
      type: string
    description: |
      The same as in the Pods' `spec.nodeSelector` parameter in Kubernetes.

      If the parameter is omitted or `false`, `nodeSelector` will be determined [automatically](https://deckhouse.io/documentation/v1/#advanced-scheduling).

      **Cation!** Deckhouse will stop working if there is a nonexistent label in `nodeSelector`. You need to change the values to the correct ones in `ModuleConfig/deckhouse` and `deployment/deckhouse` to get Deckhouse back on track.
  tolerations:
    type: array
    description: |
      The same as in the Pods' `spec.tolerations` parameter in Kubernetes;

      If the parameter is omitted or `false`, `tolerations` will be determined [automatically](https://deckhouse.io/documentation/v1/#advanced-scheduling).

      **Cation!**  Deckhouse will stop working if `tolerations` specified are incorrect. You need to change the values to the correct ones in `ModuleConfig/deckhouse` and `deployment/deckhouse` to get Deckhouse back on track.
    items:
      type: object
      properties:
        effect:
          type: string
        key:
          type: string
        operator:
          type: string
        tolerationSeconds:
          type: integer
          format: int64
        value:
          type: string

  highAvailability:
    type: boolean
    x-examples: [true]
    description: |
      Manually enable the high availability mode.

      By default, Deckhouse automatically decides whether to enable the HA mode. Click [here](../../deckhouse-configure-global.html#parameters) to learn more about the HA mode for modules.
